import Vue from 'vue'
import Vuex from "vuex"
import createLogger from "vuex/dist/logger"

// 页面布局
import mdSharedStore from './modules/md.shared.store'
import mdUserStore from './modules/md.user.store'
import mdDictStore from './modules/md.dict.store'
import md720vrEditorStore from './modules/md.720vr.editor.store'
import md20vrPreviewStore from './modules/md.720vr.preview.store'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
    state: {},
    mutations: {},
    actions: {},
    modules: {
        mdShared: mdSharedStore,
        mdUser: mdUserStore,
        mdDict: mdDictStore,
        md720vrEditor: md720vrEditorStore,
        md20vrPreview: md20vrPreviewStore
    },
    plugins: debug ? [createLogger()] : []
})